proto_list := ./proto/rpc/service.proto
py_list := $(patsubst ./proto/rpc/%.proto,./rpc/%_pb2_grpc.py,$(proto_list))
py_list += $(patsubst ./proto/rpc/%.proto,./rpc/%_pb2.py,$(proto_list))


./rpc/%_pb2_grpc.py : ./proto/rpc/%.proto
	python -m grpc_tools.protoc -I ./proto --grpc_python_out=. $(proto_list)

./rpc/%_pb2.py : ./proto/rpc/%.proto
	python -m grpc_tools.protoc -I ./proto --python_out=. $(proto_list)	

gen: $(py_list)


debug: 
	echo $(proto_list)
	echo $(py_list)
